
<html>
	<head>
		<title> ifttt / Sign in </title>
		<link rel="stylesheet" type="text/css" href="css/ifttt.css" />

		<link href='img/favicon2.ico' rel='shortcut icon' type='image/ico' />

	</head>
	
	<%
		session.removeAttribute("usr");
	%>
	
	<body class='ifttt signed_out' id='body_area' style="min-height:600px">
		<div class='coming_soon' id='wrap_all'>
			<div id='header'>
				<div id='header_inner'>
					<div id='title'>
						<h1 style='font-size:32px;'>
							<a class='logo_box_nerd' href='.' title='Dashboard'>
								<img src='img/ifttt.png' style='margin:10px 0 0 0; 
									width:30px; height:30px;'></img>
							</a>
							Sign in to ifttt
						</h1>
					</div>
					
					<div class='nav_right_side'>

						
						<div id='header_nav'>
							<div class='signup_menu nav_menu'>
								<a href='join.jsp' style='width:200px;'>
								Join
								</a>
							</div>
						</div>

					</div>
				</div>
			</div>
		
			<div class='clear'></div>
			<br />
			
			<form action="UsrLogin" id="new_user" method="post">
				<div>
					<label for="login">Username or Email</label>
					<br />
					<input id="login" name="login" size="22" type="text" />
				</div>
				<div>
					<label for="password">Password</label>
					<br />
					<input id="password" name="password" size="22" type="password" />
				</div>
				<div style='color:blue; font-style:italic;'>
					<a href='forgetPassword.jsp'>
					forget the password?
					</a>
				</div>
				<div>
					<div class='big_btn'>
						<input name="commit" type="submit" value="Sign in" />
					</div>
					
					<div class='error'>
						<%@ page import = "page.PageState" %>
						<%
							Object o = request.getAttribute("error_cause");
							if ( o != null ) {
								
								int error_cause = (Integer) o;
								switch (error_cause) {
									case PageState.LOGIN_ERROR: 
										out.println("Login or Password error");
										break;
									case PageState.LOGIN_NOT_EXIST: 
										out.println("You have to Login");
										break;
									default:
										out.println("Unknown error");
										break;
								}
							}
						%>
					</div>
					
				</div>
			</form>
			
		</div>
		
		<div id='footer_inner'>
			<div id='logo'>
				<h2 class='ifttt_logo_footer'>
					<span class='full_logo_text'>
						<a href="index.html" title="Return to home page">ifttt</a>
					</span>
				</h2>
				<div class="njucs">
					NJUCS
				</div>
			</div>
			<div id='other_links'>
				<div>
					<span><a href="u.html">About</a></span>
					<span><a href="http://code.google.com/p/njucs-ifttt/">Blog</a></span>
					<span><a href="http://ws.nju.edu.cn">Contact</a></span>
					<span><a href="http://code.google.com/p/njucs-ifttt/">Terms</a></span>
					<span><a href="index.html">Privacy</a></span>
					<div class='clear'></div>
				</div>
			</div>
			<div class='break'></div>
			<div id='created_in'>
			Created in njucs
			</div>
		</div>
	</body>
</html>
